package org.example.fallback;

import org.example.remote.HelloRemote;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class HelloRemoteFallBack implements FallbackFactory {
    @Override
    public HelloRemote create(Throwable cause) {
        return new HelloRemote() {
            @Override
            public String hello(String name) {
                return "Hello , this is FallbackFactory";
            }
        };
    }
}